// 不包含 max
export function nextInt(max: number) {
  max = max == null ? Number.MAX_SAFE_INTEGER : ~~max
  const r = -0.5 + (max - 0.00000000001) * Math.random()
  return Math.round(r)
}
